<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./AdminTemplate.xhtml">
            <ui:define name="content">
                <h2>Create New Seminar</h2>
                <h:form>
                    <p:outputPanel id="form">
                        <p:messages showDetail="true"/>
                        <h:panelGrid columns="2" cellpadding="2">
                            Seminar Name  : <p:inputText value="#{eventManager.name}" required="true" requiredMessage="Please enter Seminar Name"/>
                            Introduction  : <p:inputTextarea value="#{eventManager.intro}" maxHeight="200" style="width:400px" required="true" requiredMessage="Please enter Introduction"/>
                            Topic  : <p:inputTextarea value="#{eventManager.topic}" maxHeight="200" style="width:400px" required="true" requiredMessage="Please enter topic"/>
                            Speaker : <p:inputText value="#{eventManager.speakerOrGuest}" required="true" requiredMessage="Please enter speaker name"/>
                            Start time  : <p:calendar value="#{eventManager.starttime}" required="true" requiredMessage="Please enter start time"/>
                            Price  : <p:inputText value="#{eventManager.price}" required="true" requiredMessage="Please enter Price"/>
                            Apply Procedure  : <p:inputTextarea value="#{eventManager.applyProcedure}" maxHeight="200" style="width:400px" required="true" requiredMessage="Please enter Apply Process"/>
                            Requirement  : <p:inputTextarea value="#{eventManager.requirement}" maxHeight="200" style="width:400px" required="true" requiredMessage="Please enter Requirement"/>
                            Address  : <p:inputTextarea value="#{eventManager.address}" maxHeight="200" style="width:400px" required="true" requiredMessage="Please enter Address"/>
                            Term  : <p:inputTextarea value="#{eventManager.term}" maxHeight="200" style="width:400px" required="true" requiredMessage="Please enter Term of usage"/>
                            Status  :
                            <h:selectOneMenu value="#{eventManager.seminarStatus}" required="true">
                                <f:selectItems value="#{eventManager.listSta}" var="a" itemLabel="#{a.status}" itemValue="#{a.id}">
                                </f:selectItems>
                            </h:selectOneMenu>
                            Note  : <p:inputTextarea value="#{eventManager.note}" maxHeight="200" style="width:400px"/>
                            Image  : <p:inputText value="#{eventManager.image}"/>
                            <h:outputLabel/>
                            <h:panelGroup>
                                <p:commandButton value="Create" action="#{eventManager.insertEvent}" update="form"/>
                                <p:commandButton value="Reset" type="reset"/>
                            </h:panelGroup>
                        </h:panelGrid>
                    </p:outputPanel>
                </h:form>
            </ui:define>
        </ui:composition>

    </body>
</html>
